
/**
 *  \file hci_transport.h
 *
 *  Module Header File for HCI Transport module.
 */

/*
 *  Copyright (C) 2013. Mindtree Ltd.
 *  All rights reserved.
 */

#ifndef _H_HCI_TRANSPORT_
#define _H_HCI_TRANSPORT_

/* -----------------------------------------------  Header File Inclusion */
#include "BT_common.h"
#include "hci_h.h"

#ifndef HCI_TX_RUN_TIME_SELECTION

#if defined BT_UART && !defined BT_BCSP

    #include "hci_uart.h"

#elif defined BT_BCSP

    #include "hci_uart.h"
    #include "bcsp.h"

#elif defined BT_USB

    #include "hci_usb.h"

#elif defined BT_SW_TXP

    #include "hci_vendor.h"

#elif defined BT_SOCKET

    #include "hci_socket.h"

#else /* Error */

    #error "Forgot to define HCI Transport Flag in the Makefile ?"

#endif
#endif /* HCI_TX_RUN_TIME_SELECTION */


/* -----------------------------------------------  Type Definitions */


/* -----------------------------------------------  Structures */


/* -----------------------------------------------  API Declarations */
/* Init & Shutdown */
void em_hci_transport_init (void);
void hci_transport_bt_init (void);
void hci_transport_bt_shutdown (void);

/* To enqueue incoming HCI packet to Transport Buffer */
#ifndef HT_ENQUEUE_WITH_RETURN
void hci_transport_enqueue (UCHAR *packet, UINT16 packet_len);
#else /* HT_ENQUEUE_WITH_RETURN */
UINT16 hci_transport_enqueue(UCHAR *packet, UINT16 packet_len);
#endif /* HT_ENQUEUE_WITH_RETURN */

/* To get amount of free space in HCI Transport Circular Buffer */
UINT16 hci_transport_get_space ( void );

#endif /* _H_HCI_TRANSPORT_ */

